// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1

Item {
    id: rootpanel
//    width: 480
//    height: 854
    anchors.fill: parent

    /////////////////////////////////////////           close this panel
    signal closeMe()

    /////////////////////////////////////////           property s
    property string street: ""
    property string district: ""
    property string city: ""
    property string province: ""

    /////////////////////////////////////////           set properties
    function set_position_info(in_street, in_district, in_city, in_province)
    {
        street = in_street;
        district = in_district;
        city = in_city;
        province = in_province;
    }

    /////////////////////////////////////////           time to hide
    Timer
    {
        id: hidepanel
        interval: 200; running: false; repeat: false; triggeredOnStart : false;

        onTriggered:
        {
            closeMe();
        }
    }

    /////////////////////////////////////////           background
    Rectangle
    {
        id: background
        anchors.fill: parent
        color: "black"
        opacity: 0.7

        MouseArea {
            id: mouse_area1
            anchors.fill: parent

            onClicked:
            {}
        }
    }

    /////////////////////////////////////////           info frame
    Rectangle
    {
        id: infoframe
        width: 400
        height: 500
        color: "#00000000"
        border.width: 3
        border.color: "#ffffff"
        anchors.top: parent.top
        anchors.topMargin: 50
        anchors.horizontalCenter: parent.horizontalCenter
        Rectangle
        {
            id: info_header
            height: 80
            anchors.right: parent.right
            anchors.rightMargin: 0
            anchors.left: parent.left
            anchors.leftMargin: 0
            anchors.top: parent.top
            anchors.topMargin: 0

            Text {
                id: text1
                y: 34
                text: "您的位置"
                smooth: true
                font.bold: true
                anchors.left: parent.left
                anchors.leftMargin: 20
                anchors.verticalCenter: parent.verticalCenter
                font.pixelSize: 50
            }

        }

        /////////////////////////////////////////           Column of info s
        Column {
            id: column1
            spacing: 20
            anchors.rightMargin: 10
            anchors.leftMargin: 10
            anchors.bottomMargin: 90
            anchors.topMargin: 90
            anchors.fill: parent

            Item {
                id: item_address
                x: 0
                y: 6
                width: parent.width
                height: 60

                Text {
                    id: text2
                    y: 28
                    width: 126
                    height: 52
                    color: "#ffffff"
                    text: "街道："
                    anchors.left: parent.left
                    anchors.leftMargin: 10
                    anchors.verticalCenter: parent.verticalCenter
                    font.pixelSize: 44
                }

                Text {
                    id: text_address
                    y: 23
                    color: "#ffffff"
                    text: street
                    clip: true
                    anchors.right: parent.right
                    anchors.rightMargin: 10
                    anchors.left: text2.right
                    anchors.leftMargin: 10
                    anchors.verticalCenter: parent.verticalCenter
                    font.pixelSize: 44
                }
            }

            Item {
                id: item_district
                x: 0
                y: 6
                width: parent.width
                height: 60

                Text {
                    id: text3
                    y: 28
                    width: 126
                    height: 52
                    color: "#ffffff"
                    text: "区域："
                    font.pixelSize: 44
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.leftMargin: 10
                    anchors.left: parent.left
                }

                Text {
                    id: text_district
                    y: 23
                    color: "#ffffff"
                    text: district
                    clip: true
                    anchors.right: parent.right
                    anchors.rightMargin: 1
                    font.pixelSize: 44
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.leftMargin: 10
                    anchors.left: text3.right
                }
            }

            Item {
                id: item_city
                x: 0
                y: 4
                width: parent.width
                height: 60

                Text {
                    id: text4
                    y: 28
                    width: 126
                    height: 52
                    color: "#ffffff"
                    text: "城市："
                    font.pixelSize: 44
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.leftMargin: 10
                    anchors.left: parent.left
                }

                Text {
                    id: text_city
                    y: 23
                    color: "#ffffff"
                    text: city
                    clip: true
                    anchors.right: parent.right
                    anchors.rightMargin: 10
                    font.pixelSize: 44
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.leftMargin: 10
                    anchors.left: text4.right
                }
            }

            Item {
                id: item_province
                x: 0
                y: 7
                width: parent.width
                height: 60

                Text {
                    id: text5
                    y: 28
                    width: 126
                    height: 52
                    color: "#ffffff"
                    text: "省份："
                    font.pixelSize: 44
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.leftMargin: 10
                    anchors.left: parent.left
                }

                Text {
                    id: text_province
                    y: 23
                    color: "#ffffff"
                    text: province
                    clip: true
                    anchors.right: parent.right
                    anchors.rightMargin: 10
                    font.pixelSize: 44
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.leftMargin: 10
                    anchors.left: text5.right
                }
            }
        }

        Mbutton {
            id: mbutton1
            x: 100
            y: 420
            pro_height: 70
            pro_width: 220
            textstring: "我知道了"
            anchors.bottom: parent.bottom
            anchors.bottomMargin: 10
            anchors.horizontalCenter: parent.horizontalCenter

            onButtonclick:
            {
                rootpanel.state = "hide";
                hidepanel.running = true;
            }
        }
    }

    /////////////////////////////////////////           Behavior
    Behavior on opacity {
        PropertyAnimation { duration: 200; easing.type: Easing.OutQuad }
    }

    /////////////////////////////////////////           state
    states: [
        State {
            name: "hide"

            PropertyChanges {
                target: rootpanel
                opacity: 0
            }
        }
    ]
}
